# Contributor: psykose <alice@ayaya.dev>
# Maintainer: Antoine Martin (ayakael) <dev@ayakael.net>
pkgname=py3-click-didyoumean
pkgver=0.3.1
pkgrel=1
pkgdesc="Git-like did-you-mean feature in click"
url="https://github.com/click-contrib/click-didyoumean"
arch="noarch"
license="MIT"
depends="python3 py3-click"
makedepends="py3-gpep517 py3-poetry-core py3-wheel py3-setuptools"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/click-contrib/click-didyoumean/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/click-didyoumean-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	PYTHONPATH=src \
	pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ade429f972cc3f4fbb0534711b7b8269cfb8e16494390e5bddcf25a7cb55e31dbdb762c2adf62cc64b9ff590770565e5134b5b2caee149981bafa694ae2dc390  py3-click-didyoumean-0.3.1.tar.gz
"
